import React from "react";
import styles from "./style.module.scss";
import { PCLoginForm } from "./PCLoginForm";
import { ScreenMedia } from "../../lib/AppView";
import { MobileLoginForm } from "./MobileLoginForm";
import { LibAppView } from "../../lib";
import lodash from "lodash";''

const Login = LibAppView.withService({
    reqEndPoints: [{
        endPoint: "login.config",
        name: "config"
    }]
})((props) => {
    lodash.get(props.responseData,"config.data.publicKey")
    return (<div className={styles.login}>
        <ScreenMedia
            Desktop={PCLoginForm}
            Mobile={MobileLoginForm}
            publicKey={lodash.get(props.responseData,"config.data.publicKey")}
            encrypt={lodash.get(props.responseData,"config.data.encrypt")}
        />
    </div>);
});

export default Login;
